﻿using Microsoft.Extensions.Configuration;

namespace AiQiuQuan.Sport.Core
{
    /// <summary>
    /// id生成器扩展
    /// </summary>
    public static class IdGeneratorExtension
    {
        /// <summary>
        /// id生成器参数配置
        /// </summary>
        public static void ConfigrureIdOption(this IConfiguration configuration)
        {
            ushort.TryParse(configuration["WorkId"], out CommonData.WorkId);
            byte.TryParse(configuration["WorkIdBitLength"], out CommonData.WorkerBitLength);
        }
    }
}
